<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>menu_sets.html</title>
    <%@ include file="../inc.jsp" %>
  </head>
  
  
  <body onload="saveGroupModule()">
   <div class="easyui-layout" style="width:400px;height:370px;" fit="true">
			<div id="cenTitle" data-options="region:'center',title:''">
				<div class="easyui-panel" style="padding:5px" style="height:100px">
					<ul id="treeModule" class="easyui-tree" data-options="url:'${baseUrl}/admin/modules/showVisibleModule',method:'get',animate:true,checkbox:true" idField="id" treeField="name"></ul>
				</div>
			</div>
			<div data-options="region:'south',split:true" style="height:50px;">
			    <form id="formMG" method="post">
			    	<input id="gid" type="hidden" name="gid" >
			    	<input id="mids" type="hidden" name="mids" >
			    </form>
			</div>
		</div>
  </body>
  <script type="text/javascript">
  function saveGroupModule()
    	{ 
    	    $('#cenTitle').panel({title:'当前用户组:'+row.group_name});
		    $('#gid').val(row.id);
		    
    		var nodeSelect = $('#treeModule').tree('getChecked');
    		var ids="";
			for(var i=0;i<nodeSelect.length;i++){
				ids = ids + nodeSelect[i].id + ",";
            }
            $('#mids').val(ids);
            
    	
    	}
  </script>
</html>
